/*
 * @Author: namelll 2677065112@qq.com
 * @Date: 2023-06-05 11:10:06
 * @LastEditors: namelll 2677065112@qq.com
 * @LastEditTime: 2023-06-05 14:28:44
 * @FilePath: \vue3-ts-project\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//通过vue-router插件实现模板路由
import { createRouter, createWebHashHistory } from 'vue-router'

import { constantRoute } from './routes'

let router = createRouter({
    //路由模式hash
    history: createWebHashHistory(),
    routes: constantRoute,
    //滚动行为
    scrollBehavior() {
        return {
            left: 0,
            top: 0
        }
    }

})

export default router

